#pragma once

#include "stream_server_rtsp.h"

#include "base_noncopyable.h"

#include <liveMedia/liveMedia.hh>
#include <BasicUsageEnvironment/BasicUsageEnvironment.hh>
#include <groupsock/GroupsockHelper.hh>

namespace El {
namespace StreamServer {

class CRtspServer {
    DISALLOW_COPY_AND_MOVE(CRtspServer);

public:
    static CRtspServer &GetInstance();

    CRtspServer() = default;

    ~CRtspServer() = default;

    bool Start();

    void Stop();

private:
    TaskScheduler *scheduler{nullptr};
    UsageEnvironment *env{nullptr};
    RTSPServer *rtspServer{nullptr};
};

} // namespace StreamServer
} // namespace El